/*
 * @Author: ray
 * @Date: 2021-09-07 15:54:26
 * @LastEditTime: 2022-12-30 14:37:03
 * @LastEditors: ray ray.chin@163.com
 * @Description: In User Settings Edit
 * @FilePath: /app-template-uni-upgrade/src/store/mutations.js
 */
import { defaultState } from './state'
export default {
    /**
     * store数据更新
     * @param {*} state 储存
     * @param {*} data 数据
     */
    update (state, data) {
        Object.keys(data).forEach((key) => {
            state[key] = data[key];
        });
    },

    /**
     * 重置store
     */
    RESET_STATE: (state) => {
        Object.assign(state, defaultState);
    },
}
